<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Goods/index')}">商品管理列表显示</a></li>
			<li><a href="{:url('Goods/add')}">商品管理列表显示</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Goods/addPost')}">
			<div class="form-group">
				<label for="input-price" class="col-sm-2 control-label">商品<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<textarea class="form-control" name="price" id="input-price" ></textarea>
				</div>
			</div>
			<div class="form-group">
				<label for="input-image" class="col-sm-2 control-label">图片<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<!--                <input type="text" class="form-control" id="input-image" name="image">-->
					<!--                <a href="javascript:uploadOneImage('{:lang('Upload Image')}','#input-image');">上传图片</a>-->
					<input id="photo-1" type="hidden" name="image" >
					<input id="photo-1-name" type="text" name="name" title="图片名称">
					<img id="photo-1-preview" style="width: 100px;">
					<a href="javascript:uploadOneImage('图片上传','#photo-1');">上传</a>
				</div>
			</div>
			<div class="form-group">
				<label for="booklet" class="col-sm-2 control-label"><span class="form-required">*</span>图册</label>
				<div class="col-md-6 col-sm-10">
					<ul id="photos" class="pic-list unstyled"></ul>
					<a href="javascript:uploadMultiImage('图片上传','#photos','photos-item-wrapper');" class="btn btn-small">选择图片</a>
				</div>
			</div>
			<div class="form-group">
				<label for="input-yf" class="col-sm-2 control-label">运费<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-yf" name="yf">
				</div>
			</div>
			<div class="form-group">
				<label for="input-gid" class="col-sm-2 control-label">种类<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-gid" name="gid">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">运营类型<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<select name="type" class="form-control">
						<option value="0">自营</option>
						<option value="1">旗舰店</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">营销状态<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<select name="status" class="form-control">
						<option value="0">上架</option>
						<option value="1">下架</option>
						<option value="2">补货</option>
					</select>
				</div>
			</div>

			<script type="text/javascript">
				//编辑器路径定义
				var editorURL = GV.WEB_ROOT;
			</script>
			<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
			<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
			<script type="text/javascript">
				var editorcontent = new baidu.editor.ui.Editor();
				editorcontent.render('input-content');
			</script>
			<script type="text/html" id="photos-item-wrapper">
				<li id="savedimage{id}">
					<input id="photo-{id}" type="hidden" name="photos_url[]" value="{filepath}">
					<input id="photo-{id}-name" type="text" name="photos_alt[]" value="{name}" style="width: 160px;" title="图片名称">
					<img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;" οnclick="parent.image_preview_dialog(this.src);">
					<a href="javascript:upload_one_image('图片上传','#photo-{id}');">替换</a>
					<a href="javascript:(function(){$('#savedimage{id}').remove();})();">移除</a>
				</li>
			</script>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
</body>
</html>
